import datetime
import tornado.web
import sys

from logic import navlistDao
#管理后台的基类
sys.path.append("../")
from log import log
import json
from utils import strtype,jwt
from schema import Schema
import time
from services import MyDb

class baseHttp (tornado.web.RequestHandler):
    def initialize(self):
        pass

    def render(self, template_name, **kwargs):
        navlist = navlistDao.navlistDao().list()
        kwargs["navs"] = navlist
        kwargs["strtype"] = strtype
        super().render(template_name,**kwargs)

    def outputJson(self,obj):
        self.set_header("Content-Type","application/json")
        self.write(json.dumps(obj))


class authHttp(baseHttp):
    pass

